<?php
namespace app\admin\controller;
use think\Controller;

class Common extends Controller
{
	//保存管理员数据的变量
	public $info = array();

	public function __construct()
    {
    	parent::__construct();
    	$this->checkLogin();
    	$this->left_nav();
    }

    //判断是否已经登陆
	private function checkLogin()
	{
		$this->info = session("info");
		
		if(!$this->info){
			$this->redirect("Login/login");
		}else{
			$this->assign("info",$this->info);
		}
	}

	//左栏目
	private function left_nav()
	{	
		$this->assign('left_nav',left_nav());
	}
}